<?php

/**
 * @author Vince Loremia 
 * @copyright 2008
 */

class GroupJumper extends Zend_Db_Table
{
	private $db;
    
    public function __construct()
    {
        $this->db= Zend_Registry::get('db');
    }
    public function showGroups($groupId)
    {
       
    	$select = new Zend_Db_Select($this->db);
        $select 
			->from (array('profile' => 'group_profile'), array( 'profile.name', 'description', 'access', 'category_name' => 'category.name', 'avatar_id','favicon'))
			->join ('category', 'category_id = category.id', array('category_name' => 'category.name'))
        	->where('profile.id = ?', $groupId);
        $stmt = $select->query();
        $result = $stmt->fetchAll();
        return $result;
   }
}


?>